﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace TagEditor.Controllers
{
    public class Tag
    {
        public string id { get; set; }
        public string label{ get; set; }
        public string value{ get; set; }
    }
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";

            return View();
        }

        public JsonResult GetTags(string term)
        {
            var obj = new List<Tag>()
                {
                   new Tag()
                       {
                           id="1",label = "aaa",value = "aaa"
                       },
                   new Tag()
                       {
                           id="2",label = "bbb",value = "bbb"
                       },

                };
            return Json(obj, JsonRequestBehavior.AllowGet);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}
